const state = {
  deviceChange: '',
  videoFinish: '',
  deviceAppChange: '',
}

const mutations = {
  CHANGE_DEVICE_STATUS: (state, data) => {
    state.deviceChange = data
  },
  CHANGE_VIDEO_STATUS: (state, data) => {
    state.videoFinish = data
  },
  CHANGE_DEVICE_APP_STATUS: (state, data) => {
    state.deviceAppChange = data
  }
}

const actions = {
  deviceChange({ commit }, data) {
    commit('CHANGE_DEVICE_STATUS', data)
  },
  videoFinish({ commit }, data) {
    commit('CHANGE_VIDEO_STATUS', data)
  },
  deviceAppChange({ commit }, data) {
    commit('CHANGE_DEVICE_APP_STATUS', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
